<?php

namespace lvzmen\yii\cms\widgets\h;

use Yii;
use yii\base\Widget;
use yii\bootstrap\Html;

/**
 * A menu imitate the sidebar of https://docs.docker.com/get-started/
 *
 * @note It's depend on bootstrap;
 *
 * @example :
 * ```php

 * ```
 * @author chenzhiwei <chenzhiweiwk@qq.com>
 * @date   2021/08/31
 */
class H1 extends Widget
{
    public $class = "";
    public $style = "";
    public $content = "Hello World";

    public function init()
    {
        parent::init(); // TODO: Change the autogenerated stub
        $this->addCss();
    }

    public function run()
    {
        return Html::tag("h1", $this->content, ["class" => "cms-article-h1 {$this->class}"]);
    }


    public function addCss(){
        $css = <<<CSS
.cms-article-h1 {
    font-size: 36px;
    line-height: 48px;
}
CSS;
        $this->view->registerCss($css);
    }
}
